class agent{
	
	//获取分销配置
	getConf(){
		return new Promise((resolve, reject) => {
			uni.$u.api.agentConf().then(res=>{
				resolve(res.data)
			})
		})
	}
	
	//是否分销
	isAgent(){
		return new Promise((resolve, reject) => {
			uni.$u.api.agentInfo().then(res=>{
				if(res.data.agent_audit_status===1){
					resolve(true)
				}else{
					resolve(false)
				}
			})
		})
	}
	
	//获取佣金数据接口
	withdrawCount(){
		return new Promise((resolve, reject) => {
			uni.$u.api.withdrawCount().then(res=>{
				resolve(res.data)
			})
		})
	}
	
	//获取
	agentInfo(){
		return new Promise((resolve, reject) => {
			uni.$u.api.agentInfo().then(res=>{
				resolve(res.data)
			})
		})
	}
	
	//获取佣提现数据
	withdraw(){
		return new Promise((resolve, reject) => {
			uni.$u.api.withdrawApply().then(res=>{
				resolve(res.data)
			})
		})
	}
}
export default new agent();